<?php

class Application_Form_Contadores extends Sgit_Form
{

    public function init_form()
    {
         $request = Zend_Controller_Front::getInstance()->getRequest();
         $id=$request->getParam('id');
         
         
         $proyecto=new Sgit_Form_Element_Select_Proyectos('id_proyecto');
         $this->addElement($proyecto);
         
         
         
         $con_numero=new Zend_Form_Element_Text('con_numero');
         $con_numero->setLabel('Número')->setRequired()
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 50));
         $this->addElement($con_numero);
         
         $con_name=new Zend_Form_Element_Text('con_name');
         $con_name->setLabel('Nombre')->setRequired()
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 100));
         $this->addElement($con_name);
         
        
         $salas=new Sgit_Form_Element_Select_Salas('id_sala');
         $this->addElement($salas);
         
         $cc=new Sgit_Form_Element_Select_CC('id_cc');
         $this->addElement($cc);
         
         $tipos =new Sgit_Form_Element_Select_Xml('ContadorTipo');
         $this->addElement($tipos);
         
              
         
         $fecha=new Sgit_Form_Element_Fecha('f_alta');
         $fecha->setLabel('Puesta en marcha');
         $this->addElement($fecha);  
         
         $codigo=new Zend_Form_Element_Text('codigo');
         $codigo->setLabel('Código')
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 6));
         $this->addElement($codigo);
         
         
         $activo =new Sgit_Form_Element_Radio_SiNo('activo');
         $activo->setLabel('Activo')->setRequired();
         $this->addElement($activo);
       
    
       
    
    
      $this->setElementDecorators(array(
		    'ViewHelper',
		   'Errors',
		    array(array('data' => 'HtmlTag'),	array('tag' => 'td', 'class' => 'element')   ),
		    array('Label', array('tag' => 'td')),
		    array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
	   ));
       
       
   

        
    }
}
